package tech.wangpai.initializer.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.wangpai.initializer.service.TestService;

@RestController
public class TestController {
    Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private TestService testService;

    @GetMapping(value = "/test1")
    public String test1() {
        logger.info("进入test1");
        String result = testService.test1();
        logger.info("test1返回：" + result);
        return result;
    }

    @GetMapping(value = "/test2")
    public String test2() {
        logger.info("进入test2");
        String result = testService.test2();
        logger.info("test2返回：" + result);
        return result;
    }

    @GetMapping(value = "/test3")
    public String test3() {
        logger.info("进入test3");
        String result = testService.test3();
        logger.info("test3返回：" + result);
        return result;
    }
}
